package item.inkcloud.userservice.pojo;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.servlet.http.Cookie;

@Component
public class CookieTemplate {

    @Value("${cookieProperties.domain}")
    private String domain;

    @Value("${cookieProperties.path}")
    private String path;

    @Value("${cookieProperties.maxAge}")
    private int maxAge ;



        public Cookie mkCookie(String name , String value){
            Cookie cookie = new Cookie(name,value);

            cookie.setDomain(domain);
            cookie.setPath(path);
            cookie.setMaxAge(maxAge);

            return cookie;



        }







}
